Skip to content

fix: address review suggestions for worker topology PR#387

Merged
kylewalke merged 1 commit into
kdev/extensionIntegrationfrom
phale/extensionIntegration-suggestions
May 18, 2026
Merged

fix: address review suggestions for worker topology PR#387
kylewalke merged 1 commit into
kdev/extensionIntegrationfrom
phale/extensionIntegration-suggestions

Conversation

@peternhale

Copy link
Copy Markdown
Contributor

Summary

  • Avoid in-place mutation of metrics result in LCSAdapter by using spread
  • Pass undefined instead of Infinity to vscode.workspace.findFiles API
  • Replace non-null assertion with optional chaining in showGraph
  • Clear ingestion timeout on server stop to prevent stale timer firing

Test plan

  • Verify queue state dashboard still renders worker topology cards correctly
  • Verify workspace loading still completes and status bar clears
  • Verify graph scope picker still works for Apex files

- Avoid in-place mutation of metrics result in LCSAdapter by using spread
- Pass undefined instead of Infinity to vscode.workspace.findFiles API
- Replace non-null assertion with optional chaining in showGraph
- Clear ingestion timeout on server stop to prevent stale timer firing
@peternhale peternhale requested a review from a team as a code owner May 15, 2026 16:35
@peternhale peternhale requested a review from kylewalke May 15, 2026 16:35
@kylewalke kylewalke merged commit 4b732a0 into kdev/extensionIntegration May 18, 2026
1 check passed
@kylewalke kylewalke deleted the phale/extensionIntegration-suggestions branch May 18, 2026 16:49
kylewalke added a commit that referenced this pull request May 19, 2026
… graph scope picker - W-22201120 (#386)

* feat(apex-lsp-extension): replace workspace load toast with status bar spinner - W-22201120

Replace vscode.window.withProgress notification with status bar updates
during workspace loading. The spinner persists until the server sends
apex/workspaceIngestionComplete, giving accurate feedback on server-side
processing time.

- Add updateApexServerStatusLoading() to status-bar.ts
- Register apex/workspaceIngestionComplete handler on web + desktop clients
- Pass workerPlatformWebUrl in initialization options for web workers
- Flatten workspace-loader async flow, remove cancellation token handling
- Add .sf/** to exclude glob, support maxFileCount in development mode
- Default findFilesAcrossWorkspaceFolders maxResults to Infinity

* feat(apex-lsp-extension): add worker topology UI and graph scope picker - W-22201120

Add extension-side UI for monitoring and configuring the worker topology:

- performanceSettingsScript: add Experimental Workers section with enable
  toggle, pool size, and resource loader controls
- queueStateScript: render worker topology cards with role status indicators
  and coordinator/worker dispatch tags on request types
- showGraph: add QuickPick scope chooser (Current File vs All Types)
- showPerformanceSettings: persist experimental.workers settings
- server-config: pre-create per-role profiling subdirectories for workers

* feat(apex-lsp-web): expose worker topology status in queue state metrics - W-22201120

Inject workerTopology from the WorkerCoordinator dispatcher into both the
apex/queueState request response and the periodic apex/queueStateChanged
notification. This enables the queue state dashboard to render live worker
role cards and dispatch indicators.

* refactor(apex-lsp-extension): extract shared ingestion complete handler

De-duplicate the apex/workspaceIngestionComplete notification handler
that was registered identically in both createWebLanguageClient and
createDesktopLanguageClient into a single registerIngestionCompleteHandler
helper.

* fix(apex-lsp-extension): exclude .sf directories at any workspace depth

The exclude glob template already wraps entries with **/{...}/**,
so the entry should be just '.sf' (not '.sf/**') to produce the
correct pattern **/.sf/** matching .sf directories at any level.

* fix(apex-lsp-extension): add 5-minute timeout for ingestion complete notification

If the server crashes or fails to send apex/workspaceIngestionComplete,
the status bar spinner would spin indefinitely. Add a 5-minute timeout
that falls back to ready state and logs a warning.

* refactor(apex-lsp-extension): type renderExperimentalWorkers parameter

Replace 'any' with ExperimentalSettings interface for the
renderExperimentalWorkers method parameter. Add ExperimentalSettings
and ExperimentalWorkersSettings interfaces to the webview script.

* fix(apex-lsp-extension): correct worker topology default in help text

The fallback when no setting exists is enabled: true, so the help text
should say "(default: on)" not "(default: off)".

* fix(apex-ls): improve type safety in worker topology integration

- Narrow the 'as any' cast in queueState handler to a proper type
  assertion (Record<string, unknown>) after the 'metrics' in-check
- Align coordinatorOnlyTypes to 'readonly string[]' on both server
  and client interfaces
- Move enrichedMetrics computation after the log statement that
  references the original metrics to reduce confusion

* fix: lint

* fix: address review suggestions for worker topology PR (#387)

- Avoid in-place mutation of metrics result in LCSAdapter by using spread
- Pass undefined instead of Infinity to vscode.workspace.findFiles API
- Replace non-null assertion with optional chaining in showGraph
- Clear ingestion timeout on server stop to prevent stale timer firing

* fix: stuck on browser download for unit tests

---------

Co-authored-by: peternhale <peternhale@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants